import request from '@/utils/request'

// export function getList(params) {
//   return request({
//     url: '/table/list',
//     method: 'get',
//     params
//   })
// }
export default {
    //分页带条件查询得到医院列表
    getHospList(page, limit, searchObj) {
        return request({
            url: `/admin/hosp/hospital/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },
    //查询dictCode查询下级数据字典
    findByDictCode(dictCode) {
        return request({
            url: `/admin/cmn/dict/findByDictCode/${dictCode}`,
            method: 'get'
        })
    },
    //根据id查询下级数据字典
    findByParentId(id) {
        return request({
            url: `/admin/cmn/dict/findChildData/${id}`,
            method: 'get'
        })
    },
    updateStatus(id, status) {
        return request({
            url: `/admin/hosp/hospital/updateStatus/${id}/${status}`,
            method: 'get'
        })
    },
    getHospById(id) {
        return request({
            url: `/admin/hosp/hospital/showHospDetail/${id}`,
            method: 'get'
        })
    },
    getDeptByHoscode(hoscode){
        return request({
            url: `/admin/hosp/department/getDeptList/${hoscode}`,
            method: 'get'
        })
    },
    getScheduleRule(page, limit, hoscode, depcode) {
        return request({
         url: `/admin/hosp/schedule/getScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
         method: 'get'
        })
      },
      getScheduleDetail(hoscode, depcode,workdate) {
        return request({
         url: `/admin/hosp/schedule/getScheduleDetail/${hoscode}/${depcode}/${workdate}`,
         method: 'get'
        })
      }
        
}